package com.gridmobi.xrtb.domain.dsp;


import com.gridmobi.xrtb.domain.dsp.common.AppConstant;

import java.io.Serializable;

/**
 * 此类的参数要严格的和 WIN IMP CLICK 三个URL的queryString参数一致,用来接收参数
 */
public class DspTrackLog implements Serializable {
    /**
     * bid请求ID
     */
    private String reqid;

    private String appid;

    private String appbundle;
    /**
     * 活动ID
     */
    private String cid;
    /**
     * 广告主id
     */
    private String aid;
    /**
     * 标签
     */
    private String labelid;
    /**
     * 素材id
     */
    private String crid;
    /**
     * publisherid
     */
    private String pubid;
    /**
     * 设备ID
     */
    private String devid;
    /**
     * adx渠道
     */
    private String channel;
    /**
     *
     */
    private String geo;
    /**
     *
     */
    private String os;
    /**
     * 展现ID
     */
    private String impid;

    /**
     * 时间戳
     */
    private String stmp;
    private String bidstmp;
    private String bidnativestmp;

    private String ctype;
    private String siteid;

    private String domain;

    private String price;
    /**
     * ADX返回的实际bidid
     */
    private String actualbid;
    private String bidId;

    private String devmodel;

    private String ip;
    private String city;
    private String osv;
    private String carrier;

    private String pos;
    private String clickid;
    private String mccmnc;

    private int h;
    private int w;

    private Integer connecttype;
    private Integer devicetype;
    private Integer weight;
    /**
     * 如果是视频素材的话 在iMP时候要记录视频事件
     */
    private String event;

    public String getMccmnc() {
        return mccmnc;
    }

    public void setMccmnc(String mccmnc) {
        this.mccmnc = mccmnc;
    }

    public String getBidstmp() {
        return bidstmp;
    }

    public void setBidstmp(String bidstmp) {
        this.bidstmp = bidstmp;
    }

    public Integer getConnecttype() {
        return connecttype;
    }

    public void setConnecttype(Integer connecttype) {
        this.connecttype = connecttype;
    }

    public Integer getDevicetype() {
        return devicetype;
    }

    public void setDevicetype(Integer devicetype) {
        this.devicetype = devicetype;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getBidId() {
        return bidId;
    }

    public void setBidId(String bidId) {
        this.bidId = bidId;
    }

    public String getReqid() {
        return reqid;
    }

    public void setReqid(String reqid) {
        this.reqid = reqid;
    }

    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }

    public String getAppbundle() {
        return appbundle;
    }

    public void setAppbundle(String appbundle) {
        this.appbundle = appbundle;
    }

    public String getCid() {
        return cid;
    }

    public void setCid(String cid) {
        this.cid = cid;
    }

    public String getCrid() {
        return crid;
    }

    public void setCrid(String crid) {
        this.crid = crid;
    }

    public String getPubid() {
        return pubid;
    }

    public void setPubid(String pubid) {
        this.pubid = pubid;
    }

    public String getDevid() {
        return devid;
    }

    public void setDevid(String devid) {
        this.devid = devid;
    }


    public String getEvent() {
        return event;
    }

    public void setEvent(String event) {
        this.event = event;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getGeo() {
        return geo;
    }

    public void setGeo(String geo) {
        this.geo = geo;
    }

    public String getOs() {
        return os;
    }

    public void setOs(String os) {
        this.os = os;
    }

    public String getImpid() {
        return impid;
    }

    public void setImpid(String impid) {
        this.impid = impid;
    }

    public String getStmp() {
        return stmp;
    }

    public void setStmp(String stmp) {
        this.stmp = stmp;
    }

    public String getSiteid() {
        return siteid;
    }

    public void setSiteid(String siteid) {
        this.siteid = siteid;
    }

    public String getDomain() {
        return domain;
    }

    public void setDomain(String domain) {
        this.domain = domain;
    }

    public String getDevmodel() {
        return devmodel;
    }

    public void setDevmodel(String devmodel) {
        this.devmodel = devmodel;
    }

    public String getOsv() {
        return osv;
    }

    public void setOsv(String osv) {
        this.osv = osv;
    }

    public String getCarrier() {
        return carrier;
    }

    public void setCarrier(String carrier) {
        this.carrier = carrier;
    }

    public String getPos() {
        return pos;
    }

    public void setPos(String pos) {
        this.pos = pos;
    }

    public String getCtype() {
        return ctype;
    }

    public void setCtype(String ctype) {
        this.ctype = ctype;
    }

    public int getH() {
        return h;
    }

    public void setH(int h) {
        this.h = h;
    }

    public int getW() {
        return w;
    }

    public void setW(int w) {
        this.w = w;
    }


    public String getActualbid() {
        return actualbid;
    }

    public void setActualbid(String actualbid) {
        this.actualbid = actualbid;
    }

    public String getClickid() {
        return clickid;
    }

    public void setClickid(String clickid) {
        this.clickid = clickid;
    }

    public String getAid() {
        return aid;
    }

    public void setAid(String aid) {
        this.aid = aid;
    }

    public String getLabelid() {
        return labelid;
    }

    public String getBidnativestmp() {
        return bidnativestmp;
    }

    public void setBidnativestmp(String bidnativestmp) {
        this.bidnativestmp = bidnativestmp;
    }

    public void setLabelid(String labelid) {
        this.labelid = labelid;
    }

    public Integer getWeight() {
        return weight;
    }

    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    /**
     * 不要轻易改log拼接顺序,  如果不许要某个属性 请置空,不然可能会影响现有解析格式
     *
     * @return
     */
    public String getPlainLog() {
        return new StringBuilder()
                .append(reqid == null ? "" : reqid).append(AppConstant.LOG_SEPARATOR)
                .append(channel == null ? "" : channel).append(AppConstant.LOG_SEPARATOR)
                .append(cid == null ? "" : cid).append(AppConstant.LOG_SEPARATOR)
                .append(crid == null ? "" : crid).append(AppConstant.LOG_SEPARATOR)
                .append(devid == null ? "" : devid).append(AppConstant.LOG_SEPARATOR)
                .append(geo == null ? "" : geo).append(AppConstant.LOG_SEPARATOR)
                .append(os == null ? "" : os).append(AppConstant.LOG_SEPARATOR)
                .append(ctype == null ? "" : ctype).append(AppConstant.LOG_SEPARATOR)
                .append(stmp == null ? "" : stmp).append(AppConstant.LOG_SEPARATOR)
                .append(appid == null ? "" : appid).append(AppConstant.LOG_SEPARATOR)
                .append(appbundle == null ? "" : appbundle).append(AppConstant.LOG_SEPARATOR)
                .append(pubid == null ? "" : pubid).append(AppConstant.LOG_SEPARATOR)
                .append(siteid == null ? "" : siteid).append(AppConstant.LOG_SEPARATOR)
                .append(domain == null ? "" : domain).append(AppConstant.LOG_SEPARATOR)
                .append(price == null ? "" : price).append(AppConstant.LOG_SEPARATOR)
                .append(bidId == null ? "" : bidId).append(AppConstant.LOG_SEPARATOR)
                .append(devmodel == null ? "" : devmodel).append(AppConstant.LOG_SEPARATOR)
                .append(ip == null ? "" : ip).append(AppConstant.LOG_SEPARATOR)
                .append(city == null ? "" : city).append(AppConstant.LOG_SEPARATOR)
                .append(osv == null ? "" : osv).append(AppConstant.LOG_SEPARATOR)
                .append(carrier == null ? "" : carrier).append(AppConstant.LOG_SEPARATOR)
                .append(pos == null ? "" : pos).append(AppConstant.LOG_SEPARATOR)
                .append(event == null ? "" : event).append(AppConstant.LOG_SEPARATOR).toString();
    }


}
